﻿using System;
using System.Globalization;
using Windows.UI.Xaml.Data;

namespace Smile.Xaml.Converter
{
    /// <summary>Convert a boolean to its inverse value</summary>
    public class InverseBooleanConverter : IValueConverter
    {
        // @Public
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            bool givenValue = false;
            if (value is bool)
            {
                givenValue = (bool)value;
            }

            return !givenValue;
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
